<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>轮回之牢: D:/Code/cProgram/CPP/Qt/TeamCurriculumDesign/Actors/Mobs/BaseMob.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">轮回之牢<span id="projectnumber">&#160;0.0.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_80876d1476b72d92a9650b7ee3516e4c.html">TeamCurriculumDesign</a></li><li class="navelem"><a class="el" href="dir_94d984b25819e36381b125ff1e4ee0f2.html">Actors</a></li><li class="navelem"><a class="el" href="dir_924df03f0c7c810860c800a6492a0772.html">Mobs</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle"><div class="title">BaseMob.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">//</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment">// Created by lenovo on 2021/8/18.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment">//</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span> </div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="preprocessor">#ifndef TEAMCURRICULUMDESIGN_BASEMOB_H</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span><span class="preprocessor">#define TEAMCURRICULUMDESIGN_BASEMOB_H</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span> </div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span> </div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="preprocessor">#include &quot;../Actor.h&quot;</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="preprocessor">#include &quot;../../Utils/Const.h&quot;</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="preprocessor">#include &quot;../../Scenes/Objects/DropObject.h&quot;</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="preprocessor">#include &quot;../../Item/Bag/MobDropBag.h&quot;</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span> </div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"><a class="line" href="class_base_mob.html">   17</a></span><span class="keyword">class </span><a class="code hl_class" href="class_base_mob.html">BaseMob</a> : <span class="keyword">public</span> <a class="code hl_class" href="class_actor.html">Actor</a> {</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span><span class="keyword">protected</span>:</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span>    <span class="comment">//怪物背包，用于指示怪物可以掉落哪些物品</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno">   20</span>    <a class="code hl_class" href="class_mob_drop_bag.html">MobDropBag</a> *mobDropBag = <span class="keyword">nullptr</span>;</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span>    <span class="keyword">explicit</span> <a class="code hl_function" href="class_base_mob.html#ae52ca5b52d948d11495caaecd58c3363">BaseMob</a>(<span class="keyword">const</span> <a class="code hl_class" href="class_point.html">Point</a> &amp;pos, <span class="keywordtype">double</span> width = 45, <span class="keywordtype">double</span> height = 60,</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span>                     <span class="keywordtype">int</span> max_health = 80, <span class="keywordtype">int</span> max_magic = 30, <span class="keywordtype">double</span> gravity = Const::DefaultGravity,</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span>                     <span class="keywordtype">double</span> velocity_x_max = 1.5, <span class="keywordtype">double</span> velocity_y_max = 1.5, <span class="keywordtype">double</span> jump_velocity_y_max = 15,</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno">   28</span>                     <span class="keywordtype">double</span> velocity_x_reduce_radio = 0.4,</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span>                     <span class="keywordtype">double</span> velocity_y_reduce_radio = 0.4);</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span> </div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span>    <span class="keywordtype">bool</span> <a class="code hl_function" href="class_base_mob.html#a527df6361cb4e6b9385c978d1b608192">isPlayer</a>() <span class="keyword">const override</span>;</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span> </div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"><a class="line" href="class_base_mob.html#a2e740d5c6375a9f225b0c3042404db3e">   41</a></span>    GameObject <a class="code hl_function" href="class_base_mob.html#a2e740d5c6375a9f225b0c3042404db3e">getGameObjectType</a>() <span class="keyword">const override</span> = 0;</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span> </div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span>    <a class="code hl_function" href="class_base_mob.html#ae52ca5b52d948d11495caaecd58c3363">BaseMob</a>(<span class="keyword">const</span> <a class="code hl_class" href="class_base_mob.html">BaseMob</a> &amp;other);</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span> </div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno">   53</span>    std::vector&lt;DropObject *&gt; <a class="code hl_function" href="class_base_mob.html#ac4b3326a103b23a7807f62818e1337f1">dropObject</a>();</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno">   54</span>};</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno">   55</span> </div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno">   56</span> </div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno">   57</span><span class="preprocessor">#endif </span><span class="comment">//TEAMCURRICULUMDESIGN_BASEMOB_H</span></div>
<div class="ttc" id="aclass_actor_html"><div class="ttname"><a href="class_actor.html">Actor</a></div><div class="ttdoc">角色基类</div><div class="ttdef"><b>Definition:</b> Actor.h:18</div></div>
<div class="ttc" id="aclass_base_mob_html"><div class="ttname"><a href="class_base_mob.html">BaseMob</a></div><div class="ttdoc">怪物类的基类</div><div class="ttdef"><b>Definition:</b> BaseMob.h:17</div></div>
<div class="ttc" id="aclass_base_mob_html_a2e740d5c6375a9f225b0c3042404db3e"><div class="ttname"><a href="class_base_mob.html#a2e740d5c6375a9f225b0c3042404db3e">BaseMob::getGameObjectType</a></div><div class="ttdeci">GameObject getGameObjectType() const override=0</div></div>
<div class="ttc" id="aclass_base_mob_html_a527df6361cb4e6b9385c978d1b608192"><div class="ttname"><a href="class_base_mob.html#a527df6361cb4e6b9385c978d1b608192">BaseMob::isPlayer</a></div><div class="ttdeci">bool isPlayer() const override</div><div class="ttdef"><b>Definition:</b> BaseMob.cpp:21</div></div>
<div class="ttc" id="aclass_base_mob_html_ac4b3326a103b23a7807f62818e1337f1"><div class="ttname"><a href="class_base_mob.html#ac4b3326a103b23a7807f62818e1337f1">BaseMob::dropObject</a></div><div class="ttdeci">std::vector&lt; DropObject * &gt; dropObject()</div><div class="ttdef"><b>Definition:</b> BaseMob.cpp:29</div></div>
<div class="ttc" id="aclass_base_mob_html_ae52ca5b52d948d11495caaecd58c3363"><div class="ttname"><a href="class_base_mob.html#ae52ca5b52d948d11495caaecd58c3363">BaseMob::BaseMob</a></div><div class="ttdeci">BaseMob(const Point &amp;pos, double width=45, double height=60, int max_health=80, int max_magic=30, double gravity=Const::DefaultGravity, double velocity_x_max=1.5, double velocity_y_max=1.5, double jump_velocity_y_max=15, double velocity_x_reduce_radio=0.4, double velocity_y_reduce_radio=0.4)</div><div class="ttdef"><b>Definition:</b> BaseMob.cpp:13</div></div>
<div class="ttc" id="aclass_mob_drop_bag_html"><div class="ttname"><a href="class_mob_drop_bag.html">MobDropBag</a></div><div class="ttdoc">怪物掉落物背包</div><div class="ttdef"><b>Definition:</b> MobDropBag.h:13</div></div>
<div class="ttc" id="aclass_point_html"><div class="ttname"><a href="class_point.html">Point</a></div><div class="ttdoc">二维点</div><div class="ttdef"><b>Definition:</b> Point.h:18</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2
</small></address>
</body>
</html>
